package com.qf.shopping.service;

import com.qf.shopping.entity.ShoppingCart;

import java.util.List;
import java.util.Map;

public interface ICartService extends BaseService<ShoppingCart>{
    /**
     *查找购物车对应的商品
     * @param uid
     * @return
     */
    List<ShoppingCart> getMyCart(Integer uid);

    /**
     * 删除购物车的单个指定商品
     * @param pid
     * @param uid
     * @return
     */
    boolean deleteByPidAndUid(Integer pid, Integer uid);

    Map<String, Object> updateMyProductNums(Integer pid, Integer uid, Integer flag);

    Boolean addToMyCart(ShoppingCart cart);

    Integer getCartProductNumsByUid(Integer uid);
}
